package com.koron.plan.web.repairplan.service;

import com.koron.plan.web.repairplan.bean.entity.PlanPackageEquipmentBean;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;

/**
 * @author twcao
 * @title: PlanPackageEquipmentService
 * @projectName GDH_EAM_V2
 * @description: 检修计划包设备列表service
 * @date 2021/9/1314:27
 */
public interface PlanPackageEquipmentService {
    /**
     * 保存或更新
     * @param factory 会话
     * @param beans 实例
     * @return
     */
    boolean saveOrUpdate(SessionFactory factory, List<PlanPackageEquipmentBean> beans);

    /**
     * 根据计划包id删除设备
     * @param packageId 计划包id
     * @return
     */
    boolean deleteByPackageId(SessionFactory factory, String packageId);

    /**
     * 根据计划id删除设备
     * @param factory
     * @param issueId
     * @return
     */
    boolean deleteByIssueId(SessionFactory factory, String issueId);

    /**
     * 根据计划ids查询设备列表
     * @param factory
     * @param issueId
     * @return
     */
    List<PlanPackageEquipmentBean> queryListByIssueIds(SessionFactory factory, List<String> planIds);

}
